{% extends 'lbforum/base_site.html' %}

{% load i18n %}
{% load lbforum_filters %}
{% load lbforum_tags %}
{% load avatar_tags %}

{% block title %}
    {{ LBFORUM_TITLE }} - {% blocktrans %}{{ view_user }}'s profile{% endblocktrans %}
{% endblock %}

{% block content_right_bar %}
    {% include 'lbforum/widgets/cur_user_profile.html' %}
{% endblock %}

{% block content_content %}

    {% include 'lbforum/account/inc_base_profile.html' %}

    <div class="sep20"></div>
    {% load pagination_tags %}
    {% autopaginate topics 50 %}
    <div class="box">
        <div class="cell"><span class="fade">{% blocktrans %}Topics by {{view_user}}{% endblocktrans %}</span></div>
        <div class="cell">
            <table width="100%" cellspacing="0" cellpadding="5" border="0" class="topics">
                <tbody>
                    <tr>
                        <th width="50" align="right">{% trans "replies" %}</th>
                        <th width="auto" align="left">{% trans "topics" %}</th>
                        <th width="200" align="left" colspan="2">{% trans "last post" %}</th>
                    </tr>
                    {% for t in topics %}     
                    <tr>
                        <td width="50" align="right" class="lend"><strong><span class="green">{{ t.num_replies|add:"-1"}}</span></strong></td>
                        <td width="auto" align="left" class="">
                            <a href="{{ t.get_absolute_url }}">{{t.subject}}</a>
                        </td>
                        <td width="80" align="left" class="">
                            {{t.get_last_post.posted_by}}
                        </td>
                        <td width="110" align="left" class="rend">
                            <small class="fade">{{ t.get_last_post.update|lbtimesince }}</small>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
        <div class="inner">
            {% paginate %}	
        </div>
    </div>
{% endblock %}

{% block footer_js %}
    <script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/jquery.min.js"></script>
    <script language="javascript" type="text/javascript"> 
        $(function(){ 
            $(".topics tr:even").css("background","#F9F9F9"); 
        }) 
    </script> 
{% endblock %}
